@mixin setLine($c: #eee) {
  content: " ";
  position: absolute;
  left: 0;
  top: 0;
  width: 200%;
  border: 1rpx solid $c;
  color: $c;
  height: 200%;
  transform-origin: left top;
  transform: scale(0.5);
}
@mixin setTopLine($c: #eee) {
  content: " ";
  position: absolute;
  left: 0;
  top: 0;
  right: 0;
  height: 1rpx;
  border-top: 1rpx solid $c;
  color: $c;
  transform-origin: 0 0;
  transform: scaleY(0.5);
}

@mixin setBottomLine($c: #eee) {
  content: " ";
  position: absolute;
  left: 0;
  bottom: 0;
  right: 0;
  height: 1rpx;
  border-bottom: 1rpx solid $c;
  color: $c;
  transform-origin: 0 100%;
  transform: scaleY(0.5);
}

@mixin setLeftLine($c: #eee) {
  content: " ";
  position: absolute;
  left: 0;
  top: 0;
  width: 1rpx;
  bottom: 0;
  border-left: 1rpx solid $c;
  color: $c;
  transform-origin: 0 0;
  transform: scaleX(0.5);
}

@mixin setRightLine($c: #eee) {
  content: " ";
  position: absolute;
  right: 0;
  top: 0;
  width: 1rpx;
  bottom: 0;
  border-right: 1rpx solid $c;
  color: $c;
  transform-origin: 100% 0;
  transform: scaleX(0.5);
}


.vh-1px, .vh-1px-t, .vh-1px-b, .vh-1px-tb, .vh-1px-l, .vh-1px-r {
  position: relative;
}

.vh-1px {
  &:before {
    @include setLine();
  }
}

.vh-1px-t {
  &:before {
    @include setTopLine();
  }
}

.vh-1px-b {
  &:after {
    @include setBottomLine();
  }
}

.vh-1px-tb {
  &:before {
    @include setTopLine();
  }
  &:after {
    @include setBottomLine();
  }
}

.vh-1px-l {
  &:before {
    @include setLeftLine();
  }
}

.vh-1px-r {
  &:after {
    @include setRightLine();
  }
}

